package cn.changeforyou.web.dao.mybatis.ext.extBuilder.writer;

import cn.changeforyou.web.dao.mybatis.ext.extBuilder.SqlContext;
import org.springframework.stereotype.Component;

/**
 * @author zhyu
 * @version 1.0
 * @date 2022/3/26 22:39
 */

@Component
public class UpdateSqlWriter extends AbstractSqlWriter {

    @Override
    void doWriteSql(SqlContext context) {
        String tableName = context.getMainTableForm().getTableName();
        context.getSql().append("UPDATE").append(" ").append(tableName);
    }

    @Override
    public SentenceEnum getSentenceEnum() {
        return SentenceEnum.update;
    }
}
